<%@ Page Language="C#" MasterPageFile="~/admin/admin1.master" AutoEventWireup="true"
    CodeFile="Users.aspx.cs" Inherits="admin_newuser" Title="Create new user" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphAdmin" runat="Server">
    <br />
    <div class="settings">
        <h1>
            <%=Resources.labels.createNewUser %>
        </h1>
        <br />
        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" LoginCreatedUser="false">
            <WizardSteps>
                <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" />
            </WizardSteps>
        </asp:CreateUserWizard>
        <asp:Label runat="server" ID="lblError" Text="Username is already taken" style="color:Red" visible="false" />
    </div>
    <br />
    <div class="settings">
        <asp:GridView runat="server" ID="gridUsers" AutoGenerateColumns="false" UseAccessibleHeader="true" CellPadding="4"
             HeaderStyle-HorizontalAlign="left" DataKeyNames="username" OnLoad="gridUsers_Load" AlternatingRowStyle-CssClass="alt" 
             AutoGenerateEditButton="true" AutoGenerateDeleteButton="true">
            <Columns>
                
                <asp:TemplateField HeaderText="<%$ Resources:labels, username %>">
                  <ItemTemplate>
                    <asp:Label ID="labelUsername" runat="server" Text='<%# Server.HtmlEncode(Eval("username").ToString()) %>' ></asp:Label>
                  </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="<%$ Resources:labels, password %>">
                  <ItemTemplate>
                    **********
                  </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="<%$ Resources:labels, email %>">
                  <ItemTemplate>
                    <%# Server.HtmlEncode(Eval("email").ToString()) %>
                  </ItemTemplate>
                  <EditItemTemplate>
                    <asp:TextBox runat="server" ID="txtEmail" Text='<%# Eval("email") %>' />
                  </EditItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="Roles" ItemStyle-Wrap="false" ItemStyle-Width="100%" />
            </Columns>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>
    </div>
</asp:Content>
